import { Navigate } from "react-router-dom"
import { Admin } from "@/utils/local"
function AdminGuard({ children }: { children: any }) {

    const admininfo = Admin.get_Admin()
    if (!admininfo.user) {
        return (children)
    } else {
        return <Navigate to="/backstage"></Navigate>
    }
}
export default AdminGuard